1. Field of the Invention
The present invention relates to an inspection apparatus, an inspection method, and a program.
2. Description of Related Art
In order to measure an accurate three-dimensional shape of a workpiece (inspection target product) by using a photometric stereo principle, there is required an illumination light source whose illumination light is incident on each surface of the workpiece with a uniform light amount. Further, an angle of incidence of the illumination light is required to be known. Moreover, since the angle of incidence of light should not change in accordance with a region of the workpiece, there is required an illumination light source having a size corresponding to the size of the workpiece to be inspected. Furthermore, scale information (actual dimension per pixel) of an image captured by a camera is also required. A visual inspection apparatus is often installed by a user, and it is difficult for the user to satisfy these strict installation conditions. Therefore, according to JP 2007-206797 A, a dedicated apparatus formed by integrating illumination and a camera is proposed, to thereby reduce a burden of installation of the user.
According to the invention described in JP 2007-206797 A, since the illumination and the camera are integrated, there is an advantage of reducing the burden of installation of the user. Nevertheless, a visual inspection apparatus using the photometric stereo principle has not prevailed in the market. There are several reasons for this. According to JP 2007-206797 A, a normal vector image (an image in which each pixel shows a normal vector of the surface of the workpiece) or a reflectance image (an image in which each pixel shows a reflectance of the surface of the workpiece), obtained by using the photometric stereo principle, is applied to image inspection. Accordingly, in the invention of JP 2007-206797 A, an applicable application is limited. For example, the reflectance image is useful for inspection of a workpiece having on its surface a number of glittering portions where luminance is saturated, and the like, but the reflectance image is not suitable for inspection of a fine uneven flaw on the surface of the workpiece or for OCR (optical character recognition) of an inscribed character. Meanwhile, in the inspection application such as the inspection of the fine uneven flaw on the surface of the workpiece or the OCR of the inscribed character, strict installation conditions are not required.
However, in such an inspection application, the user is required to adjust several image processing parameters at the time of generating an image for inspection from the normal vector image or the reflectance image. Hence, a burden of the user is desirably reduced also for this adjustment operation.